<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<html>
<head>
<link href="css/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script src="js/jquery-1.6.2.min.js"></script>
<script src="js/jquery-ui-1.8.16.js"></script>
<script src="js/sabrina.js"></script>

	<link rel="shortcut icon" type="image/jpg" href="img/logo_fb.jpg">
	<title><tiles:insertAttribute name="title" /></title>
<script>
	function showEditDialog(address) {
		var width = window.screen.availWidth-400;
		var height = window.screen.availHeight-200;
		window.showModalDialog(address, "","dialogWidth="+width+"px;dialogHeight="+height+"px");
	}
	function showDialog(address, elementId, type) {
		var obj = new Object();
		obj.name = "ttop";
		var ret = window.showModalDialog(address, obj,"dialogWidth=600px;dialogHeight=600px");
		//alert(ret);//[[],[]]
		//alert(obj.name);		
		var element = document.getElementById(elementId);
		var elementData = document.getElementById(elementId+"Data");
		
		if (ret[0][0] == 0){
		
		} else {
			//存储用
			//elementData
			
			//显示用
			if(type=="image"){
				elementData.value = ret[0];
				element.src = "uploaded/images/"+ret[1];
			} else if(type=="images"){
				elementData.value += "-"+ret[0];
				var html = "";
				
				for(i=0;i<ret[1].length;i++){
					html = html+"<img src='uploaded/images/"+ret[1][i]+"' width='80'/>";
					//html += ret[1];
				}
				element.innerHTML = html;
			} else {
				elementData.value += "-"+ret[0];
				element.innerHTML += ret[1]+"<br/>";
			}
		}
	}
</script>
<link rel="stylesheet" href="css/default.css" type="text/css" />
</head>
<body >


<table width="1224px" border="0" align="center">
	<tr>
		<td valign="top" height="30px"><h1>Admin Console - <tiles:insertAttribute name="title" /></h1></td>
	</tr>
	<tr>
		<td valign="middle" height="40px" style="border: 1px green solid;"><tiles:insertAttribute name="menu" /></td>
	</tr>
	<tr>

		<td valign="top" style="border: 1px green solid;"><tiles:insertAttribute name="body" /></td>
	</tr>
	<tr>
		<td height="200px">...</td>
	</tr>
</table>
</body>
</html>